import request from './request';

//获取文章信息
export function getDataList(offset = 0, limited = 10) {
    return request.post('/api/v1/artList',{
        offset,
        limited
    })

}
//根据id对文章进行删除
export function deleteArticleByID(id){
    return request.post(`/api/v1/artDelete/${id}`);
}

//获取文章的内容
export function getArticleContent(id){
    return request.post(`/api/v1/article/:${id}`)
}

//修改文章后保存
export function saveArticle(id, data){
    return request.post(`/api/v1/articleEdit/:${id}`, data)
}

//获取阅读量的统计数据
export function getArticleAmount(){
    return request.post(`/api/v1/articleAmount`)
}